﻿<!--BitAdmin2.0框架文件-->
<link href="../../css/lib/fileupload.css" rel="stylesheet" />
<div class="box">
    <div class="box-body querySuite-wrapper">
        <!-- 条件搜索 -->
        <div class="querySuite-filter">
            <table>
                <tr>
                    <th>示例名称：</th>
                    <td>
                        <input type="text" name="exampleName" class="form-control">
                    </td>
                </tr>
            </table>
        </div>
        <!-- 按钮 查询 导入 -->
        <div class="querySuite-button">
            <button class="btn btn-default" action="query">
                <span class="glyphicon glyphicon-search"></span>查询
            </button>
            <button class="btn btn-default" action="add" action-modal="myModal">
                <span class="glyphicon glyphicon-plus-sign"></span>添加
            </button>
            <button class="btn btn-default" action="import">
                <span class="glyphicon glyphicon-import"></span>导入
            </button>
            <button class="btn btn-default" action="import" data-url="../../example/import">
                <span class="glyphicon glyphicon-import"></span>导入二
            </button>
            <button class="btn btn-default" action="export">
                <span class="glyphicon glyphicon-export"></span>导出
            </button>
            <button class="btn btn-default" action="export" data-url="../../example/export">
                <span class="glyphicon glyphicon-export"></span>导出二
            </button>
            <button class="btn btn-danger" action="delete">
                <span class="glyphicon glyphicon-trash"></span>删除
            </button>
        </div>
        <!-- 列表-->
        <div class="querySuite-table" data-sort-name="orderNo" data-sort-order="desc"
             data-key="exampleId"
             data-query-url="../../example/QueryExample"
             data-delete-url="../../example/DeleteExample"
             data-import-url="../../WorkFlowTemp/ImportCompleteExample"
             data-export-url="../../WorkFlowTemp/ExportCompleteExample">
            <table>
                <thead>
                    <tr>
                        <th style="width:30px;"><input type="checkbox" /></th>
                        <th data-field="exampleName" data-sort="true" data-filter="true" data-format="edit">示例名称</th>
                        <th data-field="exampleText" data-sort="true">普通文本</th>
                        <th data-field="dateTimePicker" data-format="time|yyyy-MM-dd">创建时间</th>
                        <th data-field="option">编辑</th>
                    </tr>
                </thead>
            </table>
        </div>
        <!-- 分页 -->
        <div class="querySuite-paging" data-page-size="10"></div>
    </div>
</div>
<!-- 模态框（Modal）编辑数据字典信息 -->
<div id="myModal" class="modal fade formSuite-wrapper" role="dialog" aria-hidden="true">
    <div class="modal-dialog" style="width:1000px">
        <div class="modal-content">
            <div class="modal-body">
                <form data-title="示例模型"
                      data-key="exampleId"
                      data-save-url="../../Example/SaveExample"
                      data-load-url="../../Example/LoadExample">
                    <table class="table-bordered">
                        <tr>
                            <th>必填文本：</th>
                            <td>
                                <input name="exampleName" type="text" class="form-control required" placeholder="必填文本" />
                            </td>
                            <th>普通文本：</th>
                            <td>
                                <input name="exampleText" type="text" class="form-control" placeholder="普通文本">
                            </td>
                        </tr>
                        <tr>
                            <th>日期时间：</th>
                            <td>
                                <input type="text" name="exampleTime" class="form-control" data-picker="datetime" data-format="yyyy-MM-dd HH:mm:ss" placeholder="日期时间" />
                            </td>
                            <th>下拉控件：</th>
                            <td>
                                <select class="form-control" name="exampleSelect" data-select="../../system/dictionaries" data-type="a" data-text="memberName" data-value="member"></select>
                            </td>
                        </tr>
                        <tr>
                            <th>用户：</th>
                            <td>
                                <div class="input-group" data-picker="../picker/userpicker.html" data-param="single:false">
                                    <input type="text" class="form-control" name="exampleUserName" placeholder="用户" />
                                    <input type="hidden" name="exampleUser" />
                                </div>
                            </td>
                            <th>部门：</th>
                            <td>
                                <div class="input-group" data-picker="../picker/oupicker.html" data-param="single:true">
                                    <input type="text" class="form-control" name="departmentName" placeholder="部门" />
                                    <input type="hidden" name="department" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>单选：</th>
                            <td>
                                <input type="radio" name="exampleRadio" data-radio="../../system/dictionaries" data-type="a" data-text="memberName" data-value="member">
                            </td>
                            <th>复选：</th>
                            <td>
                                <input type="checkbox" name="exampleCheckbox" data-checkbox="../../system/dictionaries" data-type="b" data-text="memberName" data-value="member">
                            </td>
                        </tr>
                        <tr>
                            <th>下拉联动(异步)：</th>
                            <td>
                                <div id="linkageSelectTrue" data-linkage="../../Example/GetLinkageSelect" data-ajax="true" data-text="departmentName" data-value="departmentId">
                                    <select class="form-control" style="display:initial;width:33%" data-type="a" name="linkageSelectA"></select>
                                    <select class="form-control" style="display:initial;width:33%" data-type="b" name="linkageSelectB"></select>
                                    <select class="form-control" style="display:initial;width:33%" data-type="c" name="linkageSelectC"></select>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th>自动提示文本</th>
                            <td>
                                <input class="form-control" name="autoComplete" data-autotext="../../system/dictionaries" data-type="A" data-text="member" />
                            </td>
                            <th>自动提示下拉框</th>
                            <td>
                                <div class="input-group" data-autoselect="../../system/dictionaries" data-type="A" data-text="memberName" data-value="member">
                                    <input type="text" class="form-control" name="autoComSelectText" />
                                    <input type="hidden" name="autoComSelect" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <input type="file" name="fileupload" data-file="ico">
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <script name="repeatText" data-ueditor="repeatText"></script>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" action="save">
                    <span class="glyphicon glyphicon-saved"></span> 保存
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    <span class="glyphicon glyphicon-remove"></span> 关闭
                </button>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<script src="../../js/lib/jquery.fileupload.js"></script>
<script src="../../js/framework/bitadmin-fileupload.js"></script>
<script src="../../lib/ueditor/ueditor.config.js"></script>
<script src="../../lib/ueditor/ueditor.all.min.js"></script>
<script src="../../lib/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    $(function () {
        var querySuite = $(".querySuite-wrapper").querySuite()
            .columns["option"].format(function (event, val, data) {
                $(this).append($('<span class="btn btn-link">修改</span>')
                    .click(function () {
                        console.log(data);
                    }));
            })
            .query();

        var formSuite = $("#myModal").formSuite()
            .submit(function (result) {
                querySuite.query();
            });
    });
</script>
